From: Richard M. Stallman Date: Sat, 29 May 1993 20:02:52 +0000 (+0000) Subject: (find-change-log): Use file-chase-links. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~95799 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=afb89aea69a969185068fd5dba327b9808fa08c2;p=emacs.git (find-change-log): Use file-chase-links. --- diff --git a/lisp/add-log.el b/lisp/add-log.el index cca58931a37..22feb7d2257 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el @@ -57,12 +57,8 @@ current buffer to the complete file name." ;; Chase links in the source file ;; and use the change log in the dir where it points. (and buffer-file-name - (let (temp (file buffer-file-name)) - (while (setq temp (file-symlink-p file)) - (setq file - (expand-file-name - temp (file-name-directory file)))) - (file-name-directory file))) + (file-name-directory + (file-chase-links buffer-file-name))) default-directory))) (if (and (eq file-name change-log-default-name) (assq 'change-log-default-name (buffer-local-variables))) @@ -74,10 +70,7 @@ current buffer to the complete file name." ;; Chase links before visiting the file. ;; This makes it easier to use a single change log file ;; for several related directories. - (let (temp) - (while (setq temp (file-symlink-p file-name)) - (setq file-name - (expand-file-name temp (file-name-directory file-name))))) + (setq file-name (file-chase-links file-name)) (setq file-name (expand-file-name file-name)) ;; Move up in the dir hierarchy till we find a change log file. (let ((file1 file-name)